﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Diagnostics;
using System.IO;

namespace Eudaemon.ProeAssist.WinGUI
{
    public partial class AboutForm : Form
    {
        public AboutForm()
        {
            InitializeComponent();
        }

        private void linkLicense_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            const string LIC_FILENAME = @"gpl-2.0.txt";
            try
            {
                Process.Start(Path.Combine(Application.StartupPath, LIC_FILENAME));
            }
            catch
            {
                MessageBox.Show(LIC_FILENAME + " not found in " + Application.StartupPath);
            }

        }

        private void linkHomepage_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            const string HOMEPAGE_URL = @"http://code.google.com/p/proeassist/";
            try
            {
                Process.Start(HOMEPAGE_URL);
            }
            catch
            {
                MessageBox.Show("Failed to visit " + HOMEPAGE_URL);
            }

        }
    }
}